package stark.app.function.gobang;

import android.view.View;

import stark.app.R;
import stark.app.base.BaseWithFragmentActivity;
import stark.app.databinding.FragmentGoBangDemoBinding;
import stark.common.basic.base.BaseNoModelFragment;

public class GoBangDemoFragment extends BaseNoModelFragment<FragmentGoBangDemoBinding> {
    @Override
    protected int onCreate() {
        return R.layout.fragment_go_bang_demo;
    }

    @Override
    protected void initView() {
        mDataBinding.tvGoBangAiBattle.setOnClickListener(this);
        mDataBinding.tvGoBangHumanBattle.setOnClickListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.tvGoBangAiBattle) {
            BaseWithFragmentActivity.start(getContext(), "人机大战", GoBangAiDemoFragment.class);
        } else if (id == R.id.tvGoBangHumanBattle) {
            BaseWithFragmentActivity.start(getContext(), "双人大战", GoBangHumanDemoFragment.class);
        }
    }
}
